package com.example.demo.controller;

import com.example.demo.common.ResponseData;
import com.example.demo.domain.Student.StudentInfo;
import com.example.demo.domain.Student.StudentSave;
import com.example.demo.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class StudentController {
@Autowired
    IStudentService studentService;

@PutMapping("/update")
    public ResponseData<String> update(@RequestBody StudentInfo studentInfo){
    return  studentService.update(studentInfo);
    }
@PostMapping("/save")
    public ResponseData<String> save(@RequestBody StudentSave studentSave){
    return studentService.save(studentSave);
    }
}
